//
//  SignalRClientConnect.h
//  Coin
//
//  Created by yangy on 2018/8/27.
//  Copyright © 2018年 zzg. All rights reserved.
//

#import "SignalR.h"
#import "SignalRConst.h"

@interface SignalRClientConnect : SRHubConnection
@property (nonatomic, strong) void(^ReceiveFullMarket)(NSArray<MarketObject*>* markets);
@property (nonatomic, strong) void(^UpdateAsset)(NSString* message);
@property (nonatomic, strong) void(^ReceiveMarket)(ReceiveMarketObject* data);
@property (nonatomic, strong) void(^ReceiveKline)(id kLines);

+ (instancetype)sharedConnection;
/**
 kline历史数据

 @param market 币种
 @param interval 间隔时间 0: 1 12
 @param start 开始时间
 @param end 结束时间
 */
- (void) initWithMarket:(NSString*) market interval:(NSInteger) interval start:(NSTimeInterval) start end:(NSTimeInterval) end;

/**
 登录之后发token,服务器会推送用户资金

 @param token token
 */
- (void) registWithToken:(NSString*) token;

- (void) ping;
@end
